package day05;

import java.util.Scanner;

/*
    数组查表法（根据键盘录入索引，查找对应星期）
        意思是：String[] strArray = {"星期一","星期二",...}
 */
public class ArrayTest4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入索引值(0~6)");
        IndexOfDate(sc.nextInt());
    }

    public static void IndexOfDate(int index){
        String[] strArray = {"星期一","星期二","星期三","星期四","星期五","星期六","星期天"};
        System.out.println("你要查找的日期是:"+strArray[index]);
    }
}
